from threading import Thread

import time
# Thread的构造方法
# 主线程和子线程同时进行，所以他们同时打印
def func(param1, param2):
#这个是子线程
    while True:

        print('【新的进程】param1=%s，param2=%s' % (param1, param2))

        time.sleep(1)

if __name__ == '__main__':

    thread = Thread(target=func, args=('value1', 'value2'), name='线程1')

    thread.start()

    #下面的是主线程
    while True:

        print(thread.name)

        time.sleep(1)
